Skip to content

Add logging to YAML cycle detection#637

Open
ppkarwasz wants to merge 2 commits into
masterfrom
fix/cycle-logging
Open

Add logging to YAML cycle detection#637
ppkarwasz wants to merge 2 commits into
masterfrom
fix/cycle-logging

Conversation

@ppkarwasz
Copy link
Copy Markdown
Member

Builds on #634. When a cyclic YAML alias is detected during recursive node construction, log a warn-level message including the current key path instead of silently dropping the cyclic branch.

Also switch the visited-set bookkeeping from System.identityHashCode to an IdentityHashMap-backed set: reference equality is the right semantics for alias-cycle detection and eliminates the rare false positives that hash-code collisions could otherwise produce.

ppkarwasz added 2 commits May 12, 2026 14:19
Builds on #634. When a cyclic YAML alias is detected during recursive node construction, log a warn-level message including the current key path instead of silently dropping the cyclic branch.

Also switch the visited-set bookkeeping from `System.identityHashCode` to an `IdentityHashMap`-backed set: reference equality is the right semantics for alias-cycle detection and eliminates the rare false positives that hash-code collisions could otherwise produce.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant